home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
nt
/
source.exe
/
POSIX
/
SH
/
STD
/
STDC
/
STRRCHR.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-07-13
|
415b
|
23 lines
#include <string.h>
/*
* strrchr - find last occurrence of a character in a string
*/
char * /* found char, or NULL if none */
strrchr(s, charwanted)
Const char *s;
register char charwanted;
{
register Const char *scan;
register Const char *place;
place = NULL;
for (scan = s; *scan != '\0'; scan++)
if (*scan == charwanted)
place = scan;
if (charwanted == '\0')
return(scan);
return(place);
}